package main

import "printer"

var (
	FileColor = printer.ColorMFB{
		Mode: []int8{},
	}
	DirColor = printer.ColorMFB{
		FgColor: printer.FgBlue,
		Mode:    []int8{printer.MdHighLight},
	}
	SymlinkColor = printer.ColorMFB{
		FgColor: printer.FgCyan,
		Mode:    []int8{printer.MdHighLight},
	}
	DeviceColor = printer.ColorMFB{
		BgColor: printer.BgBlack,
		FgColor: printer.FgYellow,
		Mode:    []int8{printer.MdHighLight},
	}
)

var ErrColor = printer.ColorMFB{
	FgColor: printer.FgRed,
}

func ColorFileName(name string, t FileType) string {
	if t == File {
		return printer.SprintByColorMFB(name, FileColor)
	} else if t == Dir {
		return printer.SprintByColorMFB(name, DirColor)
	} else if t == Symlink {
		return printer.SprintByColorMFB(name, SymlinkColor)
	} else if t == Device {
		return printer.SprintByColorMFB(name, DeviceColor)
	} else {
		return ""
	}
}
